<?php
$title="Estadisticas";
include('topvisible.php');

	echo '<form method="GET" action="http://legends.miniracingonline.com/web/viewplayer.php" name="ID">';
	echo '
	<table align="center" class="Resultadosmenu">
		<tr>
			<td><span class="Texto2">Piloto:</td><td><select name="ID" onChange="this.form.submit()">';
			echo '<option value="0">Seleccionar</option>'; 
	$link=Conectarse();
	$result = mysql_query ("SELECT ID, NOMBRE, NOPILOTO FROM PILOTOS ORDER BY NOMBRE",$link); 
	while ($row = mysql_fetch_array ($result)) {
		echo '<option value="'.$row["ID"].'">'.$row["NOMBRE"].'</option>'; 
		}
	mysql_free_result($result);
	mysql_close($link);
 	echo'</select></td></tr></form>';
 	echo '<form method="GET" action="http://legends.miniracingonline.com/web/viewteam.php" name="ID">';
 	echo '
	
		<tr>
			<td><span class="Texto2">Escuderia:</td><td><select name="ID" onChange="this.form.submit()">';
 	echo '<option value="0">Seleccionar</option>';
 	$link=Conectarse();
 	$result = mysql_query ("SELECT ID, NOMBRE FROM EQUIPOS ORDER BY NOMBRE",$link);
 	while ($row = mysql_fetch_array ($result)) {
 		echo '<option value="'.$row["ID"].'">'.$row["NOMBRE"].'</option>';
 	}
 	mysql_free_result($result);
 	mysql_close($link);
 	echo'</select></td></tr></table></form>';
include('down.php'); 	
?>